﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using System.Net.Sockets;
using System.Threading;
using MessengerComponent;

namespace MessengerClient
{
    public partial class frmLogin : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        #region Các biến
        private static String recieveMess;
        private static String sendMess;
        private const int SizeBuff = 1024;
        private TcpClient khach = new TcpClient();
        private bool exit = false;
        private bool disconnect = false;
        public int group = 0;
        Thread nhan;

        #endregion
        #region Các Delegate

        //Delegate Form
        private delegate void FormCallback(frmLogin f);
        private delegate void GetMultilineListBoxAddItem(MultilineListBox lb, String s, Color color);
        private delegate void GetImageListBoxChangeItem(ImageListBox imglb, String s, bool Online);
        private delegate void GetImageListBoxAddItem(ImageListBox imglb, String s, bool Online);
        private delegate void GetImageListBoxRemoveItem(ImageListBox imglb, String s);
        private delegate void GetListBoxCallback(ListBox lb, String s);
        private delegate void GetTabCallback(TabControl tab, int index, TabPage newPage);
        private delegate void GetTabItemCallback(TabControl tab, String s);
        private delegate void GetGroupTabChat(TabControl tab, String groupName, String name, short action);
        private delegate void GetTabControl(TabControl tab);
        private delegate void GetGroupTabItemCallback(TabControl tab, String groupMess, int index);
        private delegate string GetGroupImageListBox(TabControl tab, int index, String s);


        public frmLogin()
        {
            InitializeComponent();
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
        
        }
    }
}